class Msg {
  int uid;
  var times;
  int state;
  String content;
  String video;
  String img;
  int type;

  Msg();

  Map<String, dynamic> toMap() {
    var map = new Map<String, dynamic>();
    map['uid'] = uid;
    map['times'] = times;
    map['video'] = video;
    map['img'] = img;
    map['state'] = state;
    map['content'] = content;
    map['type'] = type;
    return map;
  }

  static Msg fromMap(Map<String, dynamic> map) {
    Msg msg = new Msg();
    msg.uid = map['uid'];
    msg.video = map['video'];
    msg.type = map['type'];
    msg.times = map['times'];
    msg.img = map['img'];
    msg.state = map['state'];
    msg.content = map['content'];
    return msg;
  }
  static List<Msg> fromMapList(dynamic mapList) {
    List<Msg> list = new List(mapList.length);
    for (int i = 0; i < mapList.length; i++) {
      list[i] = fromMap(mapList[i]);
    }
    return list;
  }
}